/**
 * @author: wq
 * @Date: 2017/11/13
 * @Time: 17:28
 * <p>
 * Description:
 *          ***
 */

import axios from 'axios';
import { API_NEW_VERSION } from '../api';

const TRUCK_LOAD_EARNEST_CANCEL_ACCOUNTS = '/order/truck_load_earnest_cancel_accounts';

/**
 * 分页检索整发布信息列表
 * @param token
 * @param params
 * @returns {AxiosPromise}
 */
export const searchTruckLoadEarnestCancelAccount = params => {
  return axios.get(API_NEW_VERSION + TRUCK_LOAD_EARNEST_CANCEL_ACCOUNTS, {params: params});
};

/**
 * 保存整车销账记录
 * @param params
 * @returns {AxiosPromise}
 */
export const saveTruckLoadEarnestCancelAccount = params => {
  return axios.post(API_NEW_VERSION + TRUCK_LOAD_EARNEST_CANCEL_ACCOUNTS, params);
};

/**
 * 获取整车销账记录
 * @param params
 * @returns {AxiosPromise}
 */
export const getTruckLoadEarnestCancelAccount = id => {
  return axios.post(API_NEW_VERSION + 'order/truck_load_earnest_cancel_account/' + id);
};
